﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpenseSystem.Common;
using ExpenseSystem.Common.BaseModel;
using ExpenseSystem.DataUpdater;
using ExpenseSystem.Fether;
using ExpenseSystem.Model;
using ExpenseSystem.Core.DataAddOn;
using System.Web;

namespace ExpenseSystem.Core.ProductionModules
{
    public abstract class ProductionManager : INormalManager<ProductionModel>
    {
        protected string tran = HttpContext.Current.Items[Definition.SESSION_TRAN_STR].ToString();

        protected ProductionManager()
        {
            profile = Authority.Authority.GetUserProfile();
        }

        protected UserProfile profile;
        public static ProductionManager CreateInstance()
        {
            return new ProductionBaseManager();
        }
        protected NormalDataUpdater<ProductionModel> ProductionUpdater = new ProductionUpdaterRegister().GetProductionUpdater();

        public abstract bool Delete( ProductionModel Production,  out string message);
        public abstract bool DeleteById( long[] productionId,  out string message);
        public abstract bool Save(ProductionModel Production, out string message, params IAddable<ProductionModel>[] addables);
    }
}
